CLS
OPEN "credit.in" FOR INPUT AS #1
OPEN "credit.out" FOR OUTPUT AS #2
INPUT #1, c
INPUT #1, l
DIM a(l)
FOR i = 1 TO l
  INPUT #1, a(i)
NEXT i
FOR i = 1 TO l - 1
  FOR j = i + 1 TO l
    IF a(i) + a(j) = c THEN
      PRINT #2, LTRIM$(STR$(i)); " "; LTRIM$(STR$(j))
    END IF
  NEXT j
NEXT i
CLOSE #1, #2
END

